<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateCustomerTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('customer', function (Blueprint $table) {
            $table->id();
            $table->char('code', 5)->unique()->comment('客户代码');
            $table->string('name')->comment('公司名称');
            $table->string('short_name')->comment('公司简称');
            $table->string('license')->comment('营业执照');
            $table->tinyInteger('assure')->default(0)->comment('保证金企业 0 账册企业 1 电商企业 2 物流企业');
            $table->tinyInteger('status')->default(0)->comment('公司状态: 0 待审核 1 审核中 3 已驳回 3 已审核 4 已冻结');
            $table->string('remark', 255)->nullable()->comment('备注');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('customer');
    }
}
